From 920641d9c4a9216952c2200cd4a10938ec90e0f0 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Fri, 11 Apr 2014 11:20:08 +0200 Subject: [PATCH] prevent 0 from being used as a dynamic domid When the hardware domain is made distinct from dom0, it becomes possible to shut down and destroy domain 0 while leaving the hypervisor running. If this happens, prevent this domain ID from being considered for allocation to a new guest. Signed-off-by: Daniel De Graaf Acked-by: Keir Fraser --- xen/common/domctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/domctl.c b/xen/common/domctl.c index 5e807abef7..af3614b54f 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -436,7 +436,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) for ( dom = rover + 1; dom != rover; dom++ ) { if ( dom == DOMID_FIRST_RESERVED ) - dom = 0; + dom = 1; if ( is_free_domid(dom) ) break; } -- 2.30.2